﻿using System;
using System.Drawing;

namespace PlusPlusPaint.Layers.VisualObjects
{
    delegate void VisualObjectHandler(object sender, EventArgs ea);

    interface IVisualObject
    {
        bool CanDrawOn
        {
            get;
        }

        bool AcceptsMostText
        {
            get;
        }

        Size Size
        {
            get;
            set;
        }

        Point Location
        {
            get;
            set;
        }
        
        /// <summary>
        /// Return the object as serialized data, allowing for 
        /// </summary>
        /// <returns></returns>
        SerializedObject Serialize();
        
        /// <summary>
        /// Construct an object out of serialized data.
        /// </summary>
        void Deserialize(SerializedObject s);

        /// <summary>
        /// Return true if the point specified is within the hitbox of the
        /// object.
        /// </summary>
        bool PositionIsInHitbox(Point p);

        /// <summary>
        /// Return an exact copy of the object.
        /// </summary>
        IVisualObject Clone();

        void BurnOn(Image im);
    }
}
